﻿@model MvcGMaps.Models.Marker
@using MvcGMaps.Utils;
@using BotDetect.Web.UI.Mvc;
<form class="form-horizontal" id="insertForm" role="form" action="/Home/New" method="post">
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Новое событие</legend>
        @Html.HiddenFor(m => m.MarkerID)
        @Html.HiddenFor(m => m.Latitude)
        @Html.HiddenFor(m => m.Longitude)
        <div class="form-group input-group-sm">
            @Html.LabelFor(m => m.TypeID, "Тип: ", new { @class = "control-label" })
            @Html.DropDownList("TypeID", (SelectList)ViewData["TypeID"], new { @class = "form-control input-sm" })
        </div>
        @Html.ValidationMessageFor(m => m.TypeID)
        @Html.HiddenFor(m => m.StatusID)
        @Html.InputDate("Дата:", "datepicker", "AddedDate", Model.AddedDate.ToShortDateString(), false)
        @Html.ValidationMessageFor(m => m.AddedDate)
        <div class="form-group">
            @Html.TextAreaFor(m => m.Commentary, new { @class = "form-control", @rows = "3", @placeholder = "Комментарий" })
        </div>
        <div class="form-group">
            @{ MvcCaptcha markerCaptcha = CaptchaHelper.GetMarkerCaptcha(); }
            @Html.Label("Введите текст с картинки: ", new { @class = "control-label" })
            @Html.Captcha(markerCaptcha)
            @Html.TextBox("CaptchaCode", null, new { @class = "form-control input-sm" })
        </div>
    </fieldset>
    <div class="btn-group-sm">
        <button type="button" id="saveBtn" class="btn btn-sm btn-primary btn-block" onclick="checkCaptcha()">Сохранить</button>
    </div>
</form>